package com.example.sup.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName event_info
 */
@TableName(value ="event_info")
@Data
public class EventInfo implements Serializable {
    /**
     * 事件信息表
     */
    @TableId(type = IdType.AUTO)
    private Integer eventId;

    /**
     * 设备id
     */
    private Integer equipmentId;

    /**
     * 线路id
     */
    private Integer jackId;

    /**
     * 状态 0 已维修 1未维修
     */
    private Integer state;

    /**
     * 事件消息
     */
    private String message;

    /**
     * 故障原因
     */
    private String causeOfFailure;

    /**
     * 监区名称
     */
    private String prisonDistrictName;

    /**
     * 1/2/3/4/5 线路/电流/电压/温度/电源
     */
    private Integer type;

    /**
     * 设备名称，房间号
     */
    private String equipmentName;

    /**
     * 设备ip
     */
    private String equipmentIp;

    /**
     * 线路名称
     */
    private String jackName;

    /**
     * 线路
     */
    private String reservedFields1;

    /**
     * 1强4弱电
     */
    private Integer equipmentType;

    /**
     * 监室id
     */
    private Integer prisonId;

    /**
     * 监室名称
     */
    private String prisonName;

    /**
     * 
     */
    private Date createTime;

    /**
     * 
     */
    private String createBy;

    /**
     * 
     */
    private Date updateTime;

    /**
     * 
     */
    private String updateBy;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        EventInfo other = (EventInfo) that;
        return (this.getEventId() == null ? other.getEventId() == null : this.getEventId().equals(other.getEventId()))
            && (this.getEquipmentId() == null ? other.getEquipmentId() == null : this.getEquipmentId().equals(other.getEquipmentId()))
            && (this.getJackId() == null ? other.getJackId() == null : this.getJackId().equals(other.getJackId()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
            && (this.getMessage() == null ? other.getMessage() == null : this.getMessage().equals(other.getMessage()))
            && (this.getCauseOfFailure() == null ? other.getCauseOfFailure() == null : this.getCauseOfFailure().equals(other.getCauseOfFailure()))
            && (this.getPrisonDistrictName() == null ? other.getPrisonDistrictName() == null : this.getPrisonDistrictName().equals(other.getPrisonDistrictName()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getEquipmentName() == null ? other.getEquipmentName() == null : this.getEquipmentName().equals(other.getEquipmentName()))
            && (this.getEquipmentIp() == null ? other.getEquipmentIp() == null : this.getEquipmentIp().equals(other.getEquipmentIp()))
            && (this.getJackName() == null ? other.getJackName() == null : this.getJackName().equals(other.getJackName()))
            && (this.getReservedFields1() == null ? other.getReservedFields1() == null : this.getReservedFields1().equals(other.getReservedFields1()))
            && (this.getEquipmentType() == null ? other.getEquipmentType() == null : this.getEquipmentType().equals(other.getEquipmentType()))
            && (this.getPrisonId() == null ? other.getPrisonId() == null : this.getPrisonId().equals(other.getPrisonId()))
            && (this.getPrisonName() == null ? other.getPrisonName() == null : this.getPrisonName().equals(other.getPrisonName()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getEventId() == null) ? 0 : getEventId().hashCode());
        result = prime * result + ((getEquipmentId() == null) ? 0 : getEquipmentId().hashCode());
        result = prime * result + ((getJackId() == null) ? 0 : getJackId().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        result = prime * result + ((getMessage() == null) ? 0 : getMessage().hashCode());
        result = prime * result + ((getCauseOfFailure() == null) ? 0 : getCauseOfFailure().hashCode());
        result = prime * result + ((getPrisonDistrictName() == null) ? 0 : getPrisonDistrictName().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getEquipmentName() == null) ? 0 : getEquipmentName().hashCode());
        result = prime * result + ((getEquipmentIp() == null) ? 0 : getEquipmentIp().hashCode());
        result = prime * result + ((getJackName() == null) ? 0 : getJackName().hashCode());
        result = prime * result + ((getReservedFields1() == null) ? 0 : getReservedFields1().hashCode());
        result = prime * result + ((getEquipmentType() == null) ? 0 : getEquipmentType().hashCode());
        result = prime * result + ((getPrisonId() == null) ? 0 : getPrisonId().hashCode());
        result = prime * result + ((getPrisonName() == null) ? 0 : getPrisonName().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", eventId=").append(eventId);
        sb.append(", equipmentId=").append(equipmentId);
        sb.append(", jackId=").append(jackId);
        sb.append(", state=").append(state);
        sb.append(", message=").append(message);
        sb.append(", causeOfFailure=").append(causeOfFailure);
        sb.append(", prisonDistrictName=").append(prisonDistrictName);
        sb.append(", type=").append(type);
        sb.append(", equipmentName=").append(equipmentName);
        sb.append(", equipmentIp=").append(equipmentIp);
        sb.append(", jackName=").append(jackName);
        sb.append(", reservedFields1=").append(reservedFields1);
        sb.append(", equipmentType=").append(equipmentType);
        sb.append(", prisonId=").append(prisonId);
        sb.append(", prisonName=").append(prisonName);
        sb.append(", createTime=").append(createTime);
        sb.append(", createBy=").append(createBy);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", updateBy=").append(updateBy);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}